@echo off
echo Generating QM files...

:: 检查 lrelease 是否在环境变量中
where lrelease >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
    echo Error: lrelease not found in PATH
    echo Please add Qt's bin directory to your PATH environment variable
    pause
    exit /b 1
)

:: 生成所有语言的 .qm 文件
lrelease LongImageReader_en.ts -qm LongImageReader_en.qm
lrelease LongImageReader_zh_CN.ts -qm LongImageReader_zh_CN.qm

echo.
echo QM files generation completed.
pause 